            <div class="head"><h5 class="iFrames">Comment fields for <?php echo $template->getName() ?></h5></div>
            <table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
                <thead>
                    <tr>
                        <th>Name</th>
                        <th>Field Type</th>
                        <th>Required</th>
                        <th>Actions</th>
                    </tr>
                </thead>
                <tbody>
                    	<?php foreach ($fields as $field){ ?>
		                    <tr class="gradeA">
		                        	<td><?php echo $field->getName(); ?></td>
		                        	<td><?php echo $field->getFieldType(); ?></td>
		                        	<td style="width: 50px; text-align: center"><?php
		                        	 if( $field->getRequired() == true){
		                        	 	?>
		                        	 	<img src="<?php echo image_path("icons/notifications/accept.png")?>" title="Required" />
		                        	 	<?php 
		                        	 } 
		                        	 ?></td>
		                        	<td align="center" style="width: 100px;">
                        				<img style="cursor:pointer"  src="<?php echo image_path("icons/color/notebook.png")?>" onclick="$.ajax({type: 'POST', url: '<?php echo url_for('comment_fields/show?id=' . $field->getId() )?>', script:true, cache:false, success: function(data) {  $('#category_div').html(data);} });")) />
										<img style="cursor:pointer; margin-left: 10px"   src="<?php echo image_path("icons/color/cross.png")?>" onclick="jConfirm('Are you sure you want to delete the selected Comment field?', 'Confirmation Dialog', function(r){if (!r){return false} else {$.ajax({type: 'POST', url: '<?php echo url_for('comment_fields/delete?id=' . $field->getId() )?>', script:true, cache:false, success: function(data) {  $('#category_container_div').html(data);} })}});")) />		   
		                        	</td>
		                    </tr>
                        <?php }?>
                </tbody>
            </table>
       
        
        <script>
    	oTable = $('#example').dataTable({
    		"bJQueryUI": true,
    		"sPaginationType": "full_numbers",
    		"sDom": '<""f>t<"F"lp>',
    		"bDestroy": true
    	});
        </script>